package com.wnxy.stu.api;

import com.wnxy.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author yellow Docter
 * @date 2024 -04-18
 * @desc
 * 远程调用失败 直接走 TestProductApiFallBack 默认实现的方法
 */
@FeignClient(contextId = "testProductApi",
        value = "stu-product",
        fallback = TestProductApiFallBack.class)
public interface TestProductApi {

    @GetMapping("/test/list/{id}")
    Result listById(@PathVariable("id") Integer id);

}
